//
//  Api.h
//  zhijian
//
//  Created by yiban on 2019/1/21.
//  Copyright © 2019 lcb. All rights reserved.
//

#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@interface ApiResponse:BaseModel
@property(nonatomic,assign) NSInteger code;
@property(nonatomic,strong) NSString* message;
@property(nonatomic,strong) id data;
@end

typedef void (^callbackBlock)(ApiResponse *response,NSString* errorMsg);
@interface Api : NSObject
singleton_interface(Api)
- (void)login:(NSDictionary *)parameters callback:(callbackBlock)callback;
- (void)logout:(NSDictionary *)parameters callback:(callbackBlock)callback;
- (void)refresh:(NSDictionary *)parameters callback:(callbackBlock)callback;
- (void)me:(NSDictionary *)parameters callback:(callbackBlock)callback;
- (void)resetPwd:(NSString *)newpwd callback:(callbackBlock)callback;
- (void)forgetPwd:(NSString *)cardNo
          account:(NSString *)account
      newPassword:(NSString *)newpwd
         callback:(callbackBlock)callback;

- (void)updateUserInfo:(NSString *)headImg
          userName:(NSString *)userName
         callback:(callbackBlock)callback;

//个人
//我的收藏列表
- (void)getMyCollections:(NSString *)page
              pageSize:(NSString *)pageSize
              callback:(callbackBlock)callback;
//提交意见反馈
- (void)sendFeedBack:(NSString *)content callback:(callbackBlock)callback;
//获取我的咨询信息（仅用户）
- (void)getMyQuestionList:(NSString *)page
                pageSize:(NSString *)pageSize
                callback:(callbackBlock)callback;
//获取我的回复信息
- (void)getMyReplyInfo:(NSString *)page
              pageSize:(NSString *)pageSize Callback:(callbackBlock)callback;
//读消息
- (void)readReplyInfo:(NSString *)messageId callback:(callbackBlock)callback;

//对比搜索功能
//详细对比数据显示
- (void)getSouceDetail:(NSString *)sourceId
            callback:(callbackBlock)callback;
//关键字查询-返回列表
- (void)getSouceList:(NSString *)page
            pageSize:(NSString *)pageSize
             keyType:(NSString *)keyType
            key:(NSString *)key
             sourceType:(NSString *)sourceType
           kindsList:(NSString *)kindsList
            callback:(callbackBlock)callback;
//收藏
//取消收藏
- (void)collectioncancle:(NSString *)collectionId
              callback:(callbackBlock)callback;
//收藏问题
- (void)collectionQuestion:(NSString *)collectionId
              callback:(callbackBlock)callback;
//获取收藏信息
- (void)getCollectionInfo:(NSString *)questionId
              callback:(callbackBlock)callback;
//咨询相关接口
//发布评论（用户和专家公用，用户评论，专家回答）
- (void)publishComment:(NSString *)questionId
        replyCommentId:(NSString *)replyCommentId
        commentContent:(NSString *)commentContent
           commentPics:(NSString *)commentPics
                 callback:(callbackBlock)callback;
//咨询详情
- (void)questionDetail:(NSString *)questionId
              callback:(callbackBlock)callback;
//评论列表
- (void)commentList:(NSString *)questionId
                   page:(NSString *)page
           pageSize:(NSString *)pageSize
              callback:(callbackBlock)callback;
//发布咨询（仅用户）
- (void)publishQuestion:(NSString *)isOpen
               questionContent:(NSString *)questionContent
           questionPics:(NSString *)questionPics
           callback:(callbackBlock)callback;

//获取咨询列表（用户专家都调用这个，通过登录信息区分）
- (void)questionList:(NSString *)sortType
        content:(NSString *)content
                page:(NSString *)page
            pageSize:(NSString *)pageSize
               callback:(callbackBlock)callback;
//
- (void)uploadImages:(NSArray*)images callback:(callbackBlock)callback;
@end

NS_ASSUME_NONNULL_END
